from abc import ABC, abstractmethod
import numpy as np

class BaseASR(ABC):
    @abstractmethod
    def transcribe(self, audio_data: np.ndarray = None,audio_path:str = None) -> str: # type: ignore
        """
        语音转文本接口，所有ASR实现需继承并实现本方法
        :param audio_path: 音频文件路径
        :return: 识别结果字符串
        """
        pass

    
    @abstractmethod
    def cleanup(self):
        """
        释放资源或进行清理操作
        """
        pass